import React from 'react';
// import { bindActionCreators } from 'redux'
// import { connect } from 'react-redux'

import { WeaErrorPage, WeaTools } from 'ecCom'

import "../../style/icon.css"
// import * as Action from '../../actions/report'
import View from './Main'

import "../Component/wea-modal.less"
import "../Component/wea-table.less"
import "../Component/wea-input.less"
import "../Component/wea-select-option.less"
import "../Component/wea-checkbox.less"
import "../Component/wea-tabs.less"
import "../Component/wea-ckeditor-content.less"

//组件检错机制
class MyErrorHandler extends React.Component {
    render () {
        const hasErrorMsg = this.props.error && this.props.error !== ''
        return (
            <WeaErrorPage ecId={`${this && this.props && this.props.ecId || ''}_WeaErrorPage@sibpei`} msg={ hasErrorMsg ? this.props.error : '对不起，该页面异常，请联系管理员！' }/>
        )
    }
}

const FinalView = WeaTools.tryCatch( React, MyErrorHandler, { error: "" })(View);

export default FinalView;
